Returning the Jumio Web Client

You can launch the Jumio Web Client by extracting the web URL from the AccountResponse.

Example

    @GetMapping
    ResponseEntity<Void> initiateWebOnlyVerification() {

        final UUID reference = UUID.randomUUID();


       final WebResponse webResponse = jumioClient.initiateNewAccount(FluentBuilderWorkflows.STANDALONE_ID_VERIFICATION_10015)
                .customerInternalReference(reference.toString())
                .callbackUrl(CALLBACK_URL)
                .withDefaultCredentials()
                .performWeb(new WebSettings()
                        .successUrl("https://jumio.com/success")
                        .errorUrl("https://jumio.com/failure"));

        final HttpHeaders headers = new HttpHeaders();
        final URI location = Optional.ofNullable(webResponse.getAccountResponse())
                .map(AccountResponse::getWeb)
                .map(AccountResponseWeb::getHref)
                .orElseThrow(() -> new IllegalStateException("No URL configured for your account"));
        headers.setLocation(location);
        return new ResponseEntity<>(headers, HttpStatus.MOVED_PERMANENTLY);
    }